import request from '@/utils/request'

export function login(data) {
    return request({
        url: '/users/login',
        method: 'post',
        data
    })
}

export function getInfo() {
    return request({
        url: '/users/getInfo',
        method: 'get',
    })
}
export function getUserList(data) {
    return request({
        url: '/users/getuserList',
        method: 'post',
        data
    })
}
export function updateUserMessage(data) {
    return request({
        url: '/users/updateMessage',
        method: 'post',
        data
    })
}

export function updateInfo(token) {
    return request({
        url: '/vue-admin-template/users/updateInfo',
        method: 'post',
        params: { token }
    })
}
export function updatePassword(data) {
    return request({
        url: '/users/updatePassword',
        method: 'post',
        data
    })
}
export function logout() {
    return request({
        url: '/users/logout',
        method: 'post'
    })
}
export function register(data) {
    return request({
        url: '/users/register',
        method: 'post',
        data
    })
}
//获取维修人员列表
export function getOperator() {
    return request({
        url: '/users/getOperator',
        method: 'get'
    })
}
export function getAllUser() {
    return request({
        url: '/users/getAllUser',
        method: 'get'
    })
}